/*
ONEGAME
Copyright (C) 2009  Pablo Caballero

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
package one.map;

import java.awt.Dimension;
import java.awt.Image;
import swing.tree.ITreeModelNode;

/**
 * A layer of a map
 * @author Pablo Caballero
 * @version 1.0 22-jun-2009
 */
public interface ILayerMap extends ITreeModelNode {

	public static final int CELL_SIZE = 25;

	/**
	 * Gets the name of the layer
	 * @return the name of the layer
	 */
	public String getName();

	/**
	 * Return the current buffer
	 * @param utc the time in milliseconds (UTC)
	 * @return a buffer with the image
	 */
	public Image paint(long utc);

	/**
	 * Sets the name of the layer
	 * @param name the name of the layer
	 */
	public void setName(String name);

	/**
	 * Gets the dimension of the layer
	 * @return the dimension of the layer
	 */
	public Dimension getDimension();

	/**
	 * Sets the dimension of the layer
	 * @param d the new dimension
	 */
	public void setDimension(Dimension d);

	/**
	 * Returns the element in the cell (x,y)
	 * @param x the row
	 * @param y the column
	 * @return the element of the cell
	 */
	public Object get(int x, int y);

	/**
	 * Indicates if the the layer is visible
	 * @return {@code true} if the layer is visible
	 */
	public boolean isVisible();

	/**
	 * Sets the visible property
	 * @param visible {@code true} if the layer must be visible
	 */
	public void setVisible(boolean visible);
}
